package com.aso114.project.dialog;

import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.widget.TextView;

import com.aso114.project.R;


/**
 * 作者： Mr.H on 2017/6/13 0013
 * 邮箱：2881032622@qq.com
 * class：
 */

public class MyProgressDialog extends Dialog {

    /**
     * tvMessage：提示内容
     */
    private TextView tvMessage;

    public MyProgressDialog(@NonNull Context context, String message, boolean canCancel) {
        super(context, R.style.MyProgressDialog);
        setContentView(R.layout.dialog_progress_simple);
        tvMessage = (TextView) findViewById(R.id.tv_message);
        setCancelable(canCancel);
        tvMessage.setText(TextUtils.isEmpty(message) ? "玩命加载中..." : message);
    }
}
